﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Hyt.Web.Security;
using Hyt.Passport;
using Hyt.Passport.Service;
using Hyt.Web;
using Hyt.Core.Interceptors;
using Hyt.Passport.Models;

namespace Huayuan.ApplicationService
{
    public partial class ServiceCenter
    {
        [AuthOperation(Operation = "Administrator.Login")]
        public virtual Administrator AdministratorLogin(string username, string password, string loginip)
        {
             var administratorService = UnitOfWork.Get<AdministratorService>();
            return administratorService.Login(username, password, loginip);
        }

        [AuthOperation(Operation = "Administrator.Create")]
        public virtual Administrator CreateAdministrator(Administrator model)
        {
            var administratorService = UnitOfWork.Get<AdministratorService>();
            return administratorService.Create(model);
        }
    }
}
